package com.lyjilu.model.entity;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Set;


/**
 * The persistent class for the pop_user database table.
 * 
 */
@Entity
@Table(name="pop_user")
public class PopUser implements Serializable {
	private static final long serialVersionUID = 1L;
	private long id;
	private Date creTime;
	private String email;
	private BigDecimal groupId;
	private Date lastTime;
	private BigDecimal loginNum;
	private Date loginTime;
	private String name;
	private String password;
	private String telephone;
	private String username;
	private PopDep popDep;
	private Set<PopUserGroup> popUserGroups;
	private Set<PopUserLog> popUserLogs;
	private Set<PopUserPopedom> popUserPopedoms;
	private Set<PopUserRole> popUserRoles;

    public PopUser() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(unique=true, nullable=false, precision=10)
	public long getId() {
		return this.id;
	}

	public void setId(long id) {
		this.id = id;
	}


    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="cre_time")
	public Date getCreTime() {
		return this.creTime;
	}

	public void setCreTime(Date creTime) {
		this.creTime = creTime;
	}


	@Column(length=64)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}


	@Column(name="group_id", precision=10)
	public BigDecimal getGroupId() {
		return this.groupId;
	}

	public void setGroupId(BigDecimal groupId) {
		this.groupId = groupId;
	}


    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="last_time")
	public Date getLastTime() {
		return this.lastTime;
	}

	public void setLastTime(Date lastTime) {
		this.lastTime = lastTime;
	}


	@Column(name="login_num", precision=10)
	public BigDecimal getLoginNum() {
		return this.loginNum;
	}

	public void setLoginNum(BigDecimal loginNum) {
		this.loginNum = loginNum;
	}


    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="login_time")
	public Date getLoginTime() {
		return this.loginTime;
	}

	public void setLoginTime(Date loginTime) {
		this.loginTime = loginTime;
	}


	@Column(length=16)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}


	@Column(nullable=false, length=32)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}


	@Column(length=16)
	public String getTelephone() {
		return this.telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}


	@Column(nullable=false, length=32)
	public String getUsername() {
		return this.username;
	}

	public void setUsername(String username) {
		this.username = username;
	}


	//bi-directional many-to-one association to PopDep
    @ManyToOne
	@JoinColumn(name="dep_id")
	public PopDep getPopDep() {
		return this.popDep;
	}

	public void setPopDep(PopDep popDep) {
		this.popDep = popDep;
	}
	

	//bi-directional many-to-one association to PopUserGroup
	@OneToMany(mappedBy="popUser")
	public Set<PopUserGroup> getPopUserGroups() {
		return this.popUserGroups;
	}

	public void setPopUserGroups(Set<PopUserGroup> popUserGroups) {
		this.popUserGroups = popUserGroups;
	}
	

	//bi-directional many-to-one association to PopUserLog
	@OneToMany(mappedBy="popUser")
	public Set<PopUserLog> getPopUserLogs() {
		return this.popUserLogs;
	}

	public void setPopUserLogs(Set<PopUserLog> popUserLogs) {
		this.popUserLogs = popUserLogs;
	}
	

	//bi-directional many-to-one association to PopUserPopedom
	@OneToMany(mappedBy="popUser")
	public Set<PopUserPopedom> getPopUserPopedoms() {
		return this.popUserPopedoms;
	}

	public void setPopUserPopedoms(Set<PopUserPopedom> popUserPopedoms) {
		this.popUserPopedoms = popUserPopedoms;
	}
	

	//bi-directional many-to-one association to PopUserRole
	@OneToMany(mappedBy="popUser")
	public Set<PopUserRole> getPopUserRoles() {
		return this.popUserRoles;
	}

	public void setPopUserRoles(Set<PopUserRole> popUserRoles) {
		this.popUserRoles = popUserRoles;
	}
	
}